package com.johnzer.frame.network;

import com.google.gson.annotations.Expose;
import com.johnzer.frame.network.interfaces.IHttpResult;

import java.util.List;
import java.util.Map;

import okhttp3.Headers;

/**
 * Author   : johnzer
 * Data     : 2016-08-18  15:59
 * Describe : IHttpResult
 */
public class HttpResult<T> implements IHttpResult<T> {

    @Expose
    private int code;
    @Expose
    private String message;
    @Expose
    private T data;

    private Headers header;// 请求头

    @Override
    public Headers getHeader() {
        return header;
    }

    public void setHeader(Headers header) {
        this.header = header;
    }

    @Override
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMsg() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public T getData() {
        return data;
    }


    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "IHttpResult {" + "code=" + code + ", msg='" + message + '\'' + ", data=" + data + '}';
    }

}

